package tgc.edu.examxy.service;

import java.util.List;
import java.util.UUID;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import tgc.edu.examxy.custom.CommonService;
import tgc.edu.examxy.entity.Evaluation;
import tgc.edu.examxy.entity.EvaluationRule;
import tgc.edu.examxy.repository.EvaluationRepository;

@Service
public class EvaluationService extends CommonService<Evaluation, UUID>{
	@Autowired
	private EvaluationRepository eDAO;

	public Evaluation findByEvaluationRuleAndEvaluationXzId(EvaluationRule rules, UUID id) {
		return eDAO.findByEvaluationRuleAndEvaluationXzId(rules,id);
	}

	public void UpdatePostgrade(UUID fromString, Integer numbers) {
		eDAO.UpdatePostgrade(fromString,numbers);
	}

	public List<Evaluation> findByEvaluationRule(EvaluationRule rules) {
		return eDAO.findByEvaluationRule(rules);
	}
}
